<?php
// +----------------------------------------------------------------------
// | 迁于首页
// +----------------------------------------------------------------------
// | Author: cart <469714167@qq.com>
// +----------------------------------------------------------------------
// | Datetime: 2018-5-16 14:59:00
// +----------------------------------------------------------------------
// | Copyright: 创讯科技
// +----------------------------------------------------------------------
namespace app\ice\controller;
use \think\Controller;
use think\Loader;
use app\ice\model\Area;
class Coupon extends Controller
{
    // private $IndexModel;
    /**
     * [_initialize 初始化]
     * @return [type] [description]
     * @author carl
     * @version 2018-02-05
     * @copyright wei liang
     */
    protected function _initialize()
    {
        // parent::_initialize();
        $this->IndexModel = Loader::model('Coupon');
    }

    public function my(){
      	$param = input('post.');
      	$res = $this->IndexModel->getCouponList($param,1);
      	if($res){
        	return ['data' => $res, 'code' => 200, 'message' => '列表显示成功', 'status' => true ];
      	}else{
        	return ['data' => [], 'code' => 400, 'message' => '没有优惠券', 'status' => false ];
      	}
    }
}